package org.wanho.ums;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Author：汤小洋
 * Date：2023-04-21 14:536
 * Description：<描述>
 */
public class HtmlUtil {

    public static void parse(String fileName) throws IOException {
        BufferedReader reader = new BufferedReader(
                new InputStreamReader(
                        HtmlUtil.class.getResourceAsStream(fileName)
                )
        );
        String line = null;
        while((line = reader.readLine()) != null){
            line = line.replace("\"","\\\"");
            line = "out.print(\"" + line + "\");";
            System.out.println(line);
        }
    }

    public static void main(String[] args) throws IOException {
        parse("add.html");
    }

}
